const Model=require('../model/Model')

module.exports=class AddAr extends Model{
   static addmodel(title,content,img){
        return new Promise((resolve,reject)=>{
            this.query('INSERT INTO article(title,content,datetime,hot,img)VALUES(?,?,now(),1,?)',[title,content,img]).then(result=>{
                resolve(result)
            }).catch(err=>{
                reject(err)
            })
        })
   }
}